package com.ycp.erp.category.ui.activity;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Intent;
import android.widget.TextView;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.jakewharton.rxbinding2.view.RxView;
import com.one.common.config.RouterPath;
import com.one.common.manager.RouterManager;
import com.one.common.model.extra.DefaultExtra;
import com.one.common.utils.StringUtils;
import com.one.common.view.base.BaseActivity;
import com.one.common.view.widget.ClearEditView;
import com.one.common.view.widget.MyTitleBar;
import com.ycp.erp.R;

import java.util.concurrent.TimeUnit;

import butterknife.BindView;

/**
 * Class Des:添加库房
 * Created by bjh on 2021/8/25.
 */
@Route(path = RouterPath.ADD_CATEGORY)
public class AddCategoryActivity extends BaseActivity {
    @BindView(R.id.tvCategoryName)
    ClearEditView tvCategoryName;
    @BindView(R.id.etSortValue)
    ClearEditView etSortValue;
    @BindView(R.id.tvSubmit)
    TextView tvSubmit;
    @Override
    protected void initPresenter() {

    }
    @Override
    protected void initTitle() {
        super.initTitle();
        getMyTitleBar().setMode(MyTitleBar.Mode.BACK_TITLE)
                .setTitleText("添加类别").hideLine();
    }
    @Override
    public int getLayoutResId() {
        return R.layout.activity_add_category;
    }

    @SuppressLint("CheckResult")
    @Override
    public void initView() {
        super.initView();
        tvSubmit.setText("确认提交");
        RxView.clicks(tvSubmit).throttleFirst(2, TimeUnit.SECONDS).subscribe(o -> {
            finish();
        });
    }

}
